package com.yihu.wlyy.repository;

import com.yihu.wlyy.entity.TblPersonjoinfamilymid;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by Administrator on 2016.08.20.
 */
public interface TblPersonjoinfamilymidDao extends PagingAndSortingRepository<TblPersonjoinfamilymid, Long>, JpaSpecificationExecutor<TblPersonjoinfamilymid> {
    @Query(" FROM TblPersonjoinfamilymid a WHERE a.personid=?1 ")
    List<TblPersonjoinfamilymid> findByPersonId(Integer personid);

    @Query(" FROM TblPersonjoinfamilymid a WHERE a.familystateid=?1 ")
    List<TblPersonjoinfamilymid> findByFamilyId(Integer familyinfoid);
}
